﻿<SimpleSelect DefaultValue="lucy" Style="width:120px;" OnSelectedItemChanged="handleChange">
    <SelectOptions>
        <SimpleSelectOption Value="jack" Label="Jack"></SimpleSelectOption>
        <SimpleSelectOption Value="lucy" Label="Lucy"></SimpleSelectOption>
        <SimpleSelectOption Value="disabled" Label="Disabled" Disabled></SimpleSelectOption>
        <SimpleSelectOption Value="Yiminghe" Label="yiminghe"></SimpleSelectOption>
    </SelectOptions>
</SimpleSelect>

<SimpleSelect DefaultValues=@(new[]{"lucy","jack"}) Mode="multiple" Style="width:200px;" OnSelectedItemsChanged="handleItemsChange">
    <SelectOptions>
        <SimpleSelectOption Value="jack" Label="Jack"></SimpleSelectOption>
        <SimpleSelectOption Value="lucy" Label="Lucy"></SimpleSelectOption>
        <SimpleSelectOption Value="disabled" Label="Disabled" Disabled></SimpleSelectOption>
        <SimpleSelectOption Value="Yiminghe" Label="yiminghe"></SimpleSelectOption>
    </SelectOptions>
</SimpleSelect>

@code{
    void handleChange(string value)
    {
        Console.WriteLine(value);
    }

    void handleItemsChange(IEnumerable<string> value)
    {
        Console.WriteLine(value);
    }
}